package com.ruoyi.teaching.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.teaching.mapper.DriverMapper;
import com.ruoyi.teaching.domain.Driver;
import com.ruoyi.teaching.service.IDriverService;

/**
 * 骑手信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-08
 */
@Service
public class DriverServiceImpl implements IDriverService 
{
    @Autowired
    private DriverMapper driverMapper;

    /**
     * 查询骑手信息
     * 
     * @param dName 骑手信息主键
     * @return 骑手信息
     */
    @Override
    public Driver selectDriverByDName(String dName)
    {
        return driverMapper.selectDriverByDName(dName);
    }

    /**
     * 查询骑手信息列表
     * 
     * @param driver 骑手信息
     * @return 骑手信息
     */
    @Override
    public List<Driver> selectDriverList(Driver driver)
    {
        return driverMapper.selectDriverList(driver);
    }

    /**
     * 新增骑手信息
     * 
     * @param driver 骑手信息
     * @return 结果
     */
    @Override
    public int insertDriver(Driver driver)
    {
        return driverMapper.insertDriver(driver);
    }

    /**
     * 修改骑手信息
     * 
     * @param driver 骑手信息
     * @return 结果
     */
    @Override
    public int updateDriver(Driver driver)
    {
        return driverMapper.updateDriver(driver);
    }

    /**
     * 批量删除骑手信息
     * 
     * @param dNames 需要删除的骑手信息主键
     * @return 结果
     */
    @Override
    public int deleteDriverByDNames(String[] dNames)
    {
        return driverMapper.deleteDriverByDNames(dNames);
    }

    /**
     * 删除骑手信息信息
     * 
     * @param dName 骑手信息主键
     * @return 结果
     */
    @Override
    public int deleteDriverByDName(String dName)
    {
        return driverMapper.deleteDriverByDName(dName);
    }
}
